package cn.edu.lcu.cs.javateaching.io;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Demo1 {
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
		int i = 1;
		for (; true; i++) {
			String line = bufferedReader.readLine();
			if (line.equals("123456")) {
				System.out.println("恭喜你进入游戏");
				break;
			} else {
				if (i == 5) {
					System.out.println("密码错误，结束游戏");
					System.exit(0);
				}
			}
		}

	}
}
